{extend name="admin@public:base" /}
{block name="main-row-content"}
<div class="rows top-button col-sm-12"  style="margin:10px;">
     <p>
		<a  class="btn btn-sm btn-danger" id="export" href="javascript:;" autocomplete="off" >
			<i class="ace-icon fa 	fa-cloud-download  "></i>
			<span>备份数据库</span>
		</a>
		<a id="optimize" href="{:url('admin/Database/optimize')}" class="btn btn-sm btn-info margin-left-10">
			<i class="ace-icon fa fa-cogs  "></i>
			优化表
		</a>
		<a id="repair" href="{:url('admin/Database/repair')}" class="btn btn-sm btn-success margin-left-10">
			<i class="ace-icon fa fa-wrench  "></i>
			修复表
		</a>
	</p>
</div>
<div class="row">
	<div class="col-xs-12">
		<!-- PAGE CONTENT BEGINS -->
		<div class="row">
			<div class="col-xs-12">
			  <form id="export-form" method="post"   class="form-horizontal"  action="{:url('admin/Database/export')}">
				<table id="simple-table" class="table table-striped table-bordered table-hover">
					<thead>
						<tr>
							<th class="center">
								<label class="pos-rel">
									<input type="checkbox" class="ace checkAll" />
									<span class="lbl"></span>
								</label>
							</th>
							<th>ID</th>
							<th>数据表名</th>
							<th>表类型</th>
							<th>数据量</th>
							<th class="hidden-480">大小</th>
							<th class="hidden-480">冗余空间</th>
                            <th class="hidden-480">创建时间</th>
                            <th class="hidden-480">描述</th>
							<th>操作</th>
						</tr>
					</thead>

					<tbody class="database">
					  {foreach name="list" item="vo" key="i"}
						<tr>
						    <td class="center">
								<label class="pos-rel">
									<input type="checkbox" class="ace" name="tables[]" value="{$vo.name}"/>
									<span class="lbl"></span>
								</label>
							</td>
							<td class="center">{$i+1}</td>
							<td>{$vo.name}</td>
							<td>{$vo.engine}</td>
							<td class="hidden-480">【{$vo.rows}】条记录</td>
							<td class="hidden-480">{$vo.data_length+$vo.index_length|unit_converter}</td>
							<td class="hidden-480">{$vo.data_free|unit_converter}</td>
							<td class="hidden-480">{$vo.create_time}</td>
							<td class="hidden-480">{$vo.comment}</td>
							<td>
								<div class="hidden-sm hidden-xs btn-group backup">
									<a href="{:url('admin/Database/optimize?tables='.$vo['name'])}" id="optimize_{$vo['name']}" class="btn btn-xs btn-white btn-warning" title="优化表">
										<i class="ace-icon fa fa-cogs bigger-120" ></i><span>优化表</span>
									</a>

									<a href="{:url('admin/Database/repair?tables='.$vo['name'])}" id="repair_{$vo['name']}" class="btn btn-xs btn-info btn-white margin-left-10" data-icon="fa-wrench" title="修复表">
										<i class="ace-icon fa fa-wrench bigger-120"></i><span>修复表</span>
									</a>

								</div>

								<div class="hidden-md hidden-lg">
									<div class="inline pos-rel backup">
										<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
											<i class="ace-icon fa fa-cog icon-only bigger-110"></i>
										</button>

										<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
											<li>
												<a href="{:url('admin/Database/optimize?tables='.$vo['name'])}" id="optimize_{$vo['name']}"   class="tooltip-info"  data-rel="tooltip" title="优化表">
													<span class="orange">
														<i class="ace-icon fa fa-cogs  bigger-120"></i>
													</span>
												</a>
											</li>

											<li>
												<a class="tooltip-success " href="{:url('admin/Database/repair?tables='.$vo['name'])}" id="repair_{$vo['name']}"   data-rel="tooltip" title="修复表">
													<span class="green">
														<i class="ace-icon fa fa-wrench bigger-120"></i>
													</span>
												</a>
											</li>
										</ul>
									</div>
								</div>
							</td>
						</tr>
					  {/foreach}
					</tbody>
				</table>
			   </form>
			</div><!-- /.span -->
		</div><!-- /.row -->

		<div class="hr hr-18 dotted hr-double"></div>
	</div><!-- /.col -->
</div><!-- /.row -->
{/block}
   </body>
</html>